An SDN is a network including an SDN controller and a forwarding device, and the forwarding device is connected to the SDN using the SDN controller. On the SDN, a forwarding plane is separated from a control plane. The forwarding device is connected to the SDN using the SDN controller and is configured to complete data forwarding. The SDN controller controls a forwarding process, a forwarding rule, and the like of the forwarding device that is connected to the SDN, and the forwarding device completes data forwarding. Another SDN controller may also control, using the SDN controller, the forwarding device that is connected to the SDN using the SDN controller. When there are multiple SDN controllers on the SDN, each SDN controller may directly control a forwarding device that is connected to the SDN using the SDN controller itself, and indirectly control, using another SDN controller, a forwarding device that is connected to the SDN using the another SDN controller.
When there are many forwarding devices on the SDN, the SDN controller establishes in advance a preset path between different forwarding devices according to a connection relationship between the forwarding devices. If there are multiple SDN controllers on the SDN, each SDN controller is responsible for creating a preset path between a forwarding device directly controlled by the SDN controller and another forwarding device. In addition to first and last forwarding devices located in endpoint positions of each preset path, each preset path may further include an intermediate forwarding device connected between the first and last forwarding devices. Different forwarding devices in a same preset path may be directly controlled by different SDN controllers.
To enable a same forwarding device to implement multiplexing in different preset paths, when establishing a preset path, an SDN controller generally needs to create a port group on the forwarding device, and use the port group to establish the preset path. A port group identifier is the only index for an SDN controller to perform an operation on a port group, and a port group identifier of a forwarding device is allocated by an SDN controller that directly controls the forwarding device. Therefore, when an SDN controller that does not directly control a forwarding device creates a port group on the forwarding device, the SDN controller needs to first acquire a port group identifier allocated to the forwarding device by an SDN controller that directly controls the forwarding device, and then sends a port group create instruction containing the port group identifier to the SDN controller that directly controls the forwarding device, so that the SDN controller that directly controls the forwarding device creates the port group on the forwarding device.
Therefore, it can be seen that, if a port group is created using the prior art, an SDN controller that does not directly control a forwarding device needs to interact, in a process of creating the port group on the forwarding device, with an SDN controller that directly controls the forwarding device for many times, and the creation process is complex.